home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7997 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: central.bldrdoc.gov!news
  2. From: "G. C. Straty" <straty@harrier.bldrdoc.gov>
  3. Newsgroups: comp.lang.pascal.misc,comp.lang.pascal.borland,comp.programming,comp.lang.misc,comp.lang.c,comp.lang.c++
  4. Subject: Re: Writing an expression evaluator
  5. Date: Fri, 16 Feb 1996 16:55:53 -0700
  6. Organization: NIST
  7. Message-ID: <31251989.76ED@harrier.bldrdoc.gov>
  8. References: <311FEBD8.7305@cnj.digex.net>
  9. NNTP-Posting-Host: harrier.bldrdoc.gov
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6b (Win16; I)
  14. CC: straty@bldrdoc.gov
  15.  
  16. Aristotle wrote:
  17. > Does anyone have any tips on how to go about writing an expression
  18. > evaluator(one complex enough to handle Trig. functions). I am writing a
  19. > program that uses expression and I would like to have the user be able to
  20. >  enter their own expressions and have my program implement them. Any help
  21. >  would be appreciated. Thanks in advance!
  22. >                                 John M. "Aristotle" De CristofaroAristotle wrote:
  23. > Does anyone have any tips on how to go about writing an expression
  24. > evaluator(one complex enough to handle Trig. functions). I am writing a
  25. > program that uses expression and I would like to have the user be able to
  26. >  enter their own expressions and have my program implement them. Any help
  27. >  would be appreciated. Thanks in advance!
  28. >                                 John M. "Aristotle" De Cristofaro
  29.  
  30. Borland Pascal-3 (if you can remember that far back) included
  31. source code for what they called MicroCalc, sample code for a basic 
  32. spread sheet. In that code was a reasonably good function 
  33. interpreter and evaluator which I have used often with good results. 
  34. It will handle fairly complicated expressions as long as parens are
  35. not to deep. In digging through my stack of old 5.25 DDs I found I still 
  36. have it. If you are interested, I would be happy to make it
  37. available to you.
  38.  
  39. straty@bldrdoc.gov
  40.